<?php echo $this->Form->create('Usuario', array('class' => 'form-horizontal'));?>
	<p class="required">Os campos marcados com <em>*</em> são de preenchimento obrigatório</p>
	<fieldset>
	<legend>Dados Pessoais</legend>
	<div class="control-group required <?php echo ($this->Form->isFieldError('nome')) ? 'error' : ''; ?>">
		<?php echo $this->Form->Label('nome', 'Nome:', array('class' => 'control-label'));	?>
		<div class="controls">
			<?php echo $this->Form->input('nome', array('type' => 'text', 'label' => false, 'div' => false, 'required' => false, 'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-block'))));	?>
		</div>
	</div>
	<div class="control-group required <?php echo ($this->Form->isFieldError('perfil_id')) ? 'error' : ''; ?>">
		<?php echo $this->Form->Label('perfil_id', 'Perfil:', array('class' => 'control-label'));	?>
		<div class="controls">
			<?php echo $this->Form->input('perfil_id', array('empty' => 'Selecione...', 'label' => false, 'div' => false, 'required' => false, 'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-block'))));	?>
		</div>
	</div>
	<div class="control-group required <?php echo ($this->Form->isFieldError('email')) ? 'error' : ''; ?>">
		<?php echo $this->Form->Label('email', 'E-mail:', array('class' => 'control-label'));	?>
		<div class="controls">
			<?php echo $this->Form->input('email', array('type' => 'text', 'label' => false, 'div' => false, 'required' => false, 'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-block'))));	?>
		</div>
	</div>
	<div class="control-group">
		<?php echo $this->Form->Label('telefone', 'Telefone:', array('class' => 'control-label'));	?>
		<div class="controls">
			<?php echo $this->Form->input('telefone', array('type' => 'text', 'label' => false, 'div' => false ));	?>
		</div>
	</div>
	</fieldset>
	<fieldset>
	<legend>Login</legend>
	<div class="control-group required <?php echo ($this->Form->isFieldError('login')) ? 'error' : ''; ?>">
		<?php echo $this->Form->Label('login', 'Usuário:', array('class' => 'control-label'));	?>
		<div class="controls">
			<?php echo $this->Form->input('login', array('type' => 'text', 'label' => false, 'div' => false, 'required' => false, 'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-block'))));	?>
		</div>
	</div>
	<div class="control-group required <?php echo ($this->Form->isFieldError('password')) ? 'error' : ''; ?>">
		<?php echo $this->Form->Label('password', 'Senha:', array('class' => 'control-label'));	?>
		<div class="controls">
			<?php echo $this->Form->input('password', array('type' => 'password', 'label' => false, 'div' => false, 'required' => false, 'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-block'))));	?>
		</div>
	</div>
	<div class="control-group required <?php echo ($this->Form->isFieldError('password_confirm')) ? 'error' : ''; ?>">
		<?php echo $this->Form->Label('password_confirm', 'Confirmar Senha:', array('class' => 'control-label'));	?>
		<div class="controls">
			<?php echo $this->Form->input('password_confirm', array('type' => 'password', 'label' => false, 'div' => false, 'required' => false, 'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-block'))));	?>
		</div>
	</div>
	</fieldset>
<?php echo $this->Form->end();?>

<script type="text/javascript">
	$(document).ready(function () {
		$('#UsuarioTelefone').mask('(99) 9999-9999');
	});
</script>